<template>
  <div class="register">
    用户注册

    <button @click="handleRegister">注册</button>
  </div>
</template>

<script>
import { register } from '@/api/login'
export default {
  name: 'Register',
  data() {
    return {
      user: {
        username: '',
        password: '',
      }
    }
  },
  methods: {
    async handleRegister() {
      const result = await register(this.user)
      console.log('注册结果:', result)
    }
  }
}
</script>

<style lang="less" scoped>

</style>
